{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "436eed60-d246-41a6-868b-055cbef4e0d2",
   "metadata": {},
   "source": [
    "<!-- Banner Image -->\n",
    "<img src=\"https://uohmivykqgnnbiouffke.supabase.co/storage/v1/object/public/landingpage/brevdevnotebooks.png\" width=\"100%\">\n",
    "\n",
    "<!-- Links -->\n",
    "<center>\n",
    "  <a href=\"https://console.brev.dev\" style=\"color: #06b6d4;\">Console</a> •\n",
    "  <a href=\"https://brev.dev\" style=\"color: #06b6d4;\">Docs</a> •\n",
    "  <a href=\"/\" style=\"color: #06b6d4;\">Templates</a> •\n",
    "  <a href=\"https://discord.gg/C6qybRZY\" style=\"color: #06b6d4;\">Discord</a>\n",
    "</center>\n",
    "\n",
    "# Easy-Install Julia\n",
    "\n",
    "Welcome to this notebook!\n",
    "\n",
    "Here is an easy install guide to get you up and running with Julia. If you encounter any issues, please reach out to me on [**X**](https://x.com/harperscarroll) or on the [**Discord**](https://discord.gg/C6qybRZY)."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1e1bb51b-bcf2-47a4-b8e9-9146916f47ed",
   "metadata": {},
   "source": [
    "## 1. Check out your Brev Instance\n",
    "\n",
    "If you haven't yet done so, [sign up for a Brev account](https://console.brev.dev). You can connect your cloud credits (AWS or GCP) by clicking \"Org: \" on the top right, and in the panel that slides over, click \"Connect AWS\" or \"Connect GCP\" under \"Connect your cloud\" and follow the instructions linked to attach your credentials.\n",
    "\n",
    "Click the badge below to get a preconfigured instance:\n",
    "\n",
    "[![ Click here to deploy.](https://uohmivykqgnnbiouffke.supabase.co/storage/v1/object/public/landingpage/brevdeploynavy.svg)](https://console.brev.dev/environment/new?instance=A10G:g5.xlarge&diskStorage=256&name=julia-install&file=https://github.com/brevdev/notebooks/raw/main/julia-install.ipynb&python=3.10&cuda=12.1.1)\n",
    "\n",
    "This is for a A10G GPU. You can swap out this machine, or toggle on the \"CPU\" option if you don't need a GPU.\n",
    "\n",
    "Once you've checked out your machine and landed in your instance page, select the Python/CUDA specs you'd like (or leave as default) and click the \"Build\" button to build your autogpu container. Give this a few minutes."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "335f145b-9f17-44dd-b043-d7398df4548a",
   "metadata": {},
   "source": [
    "## 2. Launch Notebook\n",
    "Once that's Running, give it a few extra minutes to set up. Once the \"Notebook\" button unlocks on the top right side, click it to launch a Jupyter Lab environment, and upload this Notebook via drag-and-drop or the up-arrow icon."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4261a41f-2ed1-4297-a93a-98a4d65812da",
   "metadata": {},
   "source": [
    "## 3. Download Julia\n",
    "Run the following cell using Shift+Enter. After it completes successfully, click the \"Launcher\" or \"+\" tab in the top tab nav bar, and you will be able to launch a Julia Notebook or Terminal."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8d894572-c51a-4b91-bad2-8049f5b09665",
   "metadata": {},
   "outputs": [],
   "source": [
    "!sudo apt-get install subversion -y -q\n",
    "!svn export https://github.com/brevdev/template-setup-scripts/tree/main/julia --force\n",
    "!bash julia/julia.sh"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
